<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>YuTori Class: /home/shinokiwa/workspace/yutori/svn/trunk/yutoriclass/yutori.dev.php ソースファイル</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/search.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- 作成： Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "../../search",false,'検索');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">YuTori Class</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="../../index.html"><span>メインページ</span></a></li>
      <li><a href="../../pages.html"><span>関連ページ</span></a></li>
      <li><a href="../../annotated.html"><span>データ構造</span></a></li>
      <li class="current"><a href="../../files.html"><span>ファイル</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="../../search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="検索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="../../search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="../../files.html"><span>ファイル一覧</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">/home/shinokiwa/workspace/yutori/svn/trunk/yutoriclass/yutori.dev.php</div>  </div>
</div>
<div class="contents">
<div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 &lt;?php
<a name="l00034"></a><a class="code" href="../../db/d44/class_yu_tori_object.html">00034</a> <span class="keyword">class </span><a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> {
<a name="l00035"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#ac350be23da328a6f5429313efc9b96e4">00035</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#ac350be23da328a6f5429313efc9b96e4">$_instance</a> = null;
<a name="l00036"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a1c89defaf5aa7ac8e526065e8572f580">00036</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a1c89defaf5aa7ac8e526065e8572f580">$_name</a> = <span class="stringliteral">&#39;&#39;</span>;
<a name="l00037"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a41480551826add2f719e24e0d44b9715">00037</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a41480551826add2f719e24e0d44b9715">$_type</a> = <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l00038"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a8fa4d4087d153e03788aeece675aefb9">00038</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a8fa4d4087d153e03788aeece675aefb9">$_children</a> = array();
<a name="l00039"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a855690079c56270de5b278ea3ebe99df">00039</a>         <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a855690079c56270de5b278ea3ebe99df">$_parents</a> = array();
<a name="l00040"></a>00040 
<a name="l00041"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">00041</a>         <span class="keyword">static</span> <span class="keyword">protected</span> <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">$_info</a> = array(
<a name="l00042"></a>00042                 <span class="stringliteral">&#39;count_construct_object&#39;</span> =&gt; 0,
<a name="l00043"></a>00043                 <span class="stringliteral">&#39;count_destruct_object&#39;</span> =&gt; 0,
<a name="l00044"></a>00044                 <span class="stringliteral">&#39;count_object&#39;</span> =&gt; 0,
<a name="l00045"></a>00045                 <span class="stringliteral">&#39;count_max_object&#39;</span> =&gt; 0,
<a name="l00046"></a>00046                 );
<a name="l00047"></a>00047         
<a name="l00048"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a095c5d389db211932136b53f25f39685">00048</a>         <span class="keyword">public</span> function <a class="code" href="../../db/d44/class_yu_tori_object.html#a095c5d389db211932136b53f25f39685">__construct</a> () {
<a name="l00049"></a>00049                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_construct_object&#39;</span>]++;
<a name="l00050"></a>00050                 <span class="keywordflow">if</span> (++<a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>] &gt; <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_max_object&#39;</span>]) <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_max_object&#39;</span>] = <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>];
<a name="l00051"></a>00051         }
<a name="l00052"></a>00052 
<a name="l00053"></a><a class="code" href="../../db/d44/class_yu_tori_object.html#a421831a265621325e1fdd19aace0c758">00053</a>         <span class="keyword">public</span> function <a class="code" href="../../db/d44/class_yu_tori_object.html#a421831a265621325e1fdd19aace0c758">__destruct</a> () {
<a name="l00054"></a>00054                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_destruct_object&#39;</span>]++;
<a name="l00055"></a>00055                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>[<span class="stringliteral">&#39;count_object&#39;</span>]--;
<a name="l00056"></a>00056         }
<a name="l00057"></a>00057 }
<a name="l00058"></a>00058 
<a name="l00063"></a><a class="code" href="../../d0/dfd/class_yu_tori.html">00063</a> <span class="keyword">class </span><a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> <span class="keyword">extends</span> <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> {
<a name="l00064"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">00064</a>         <span class="keyword">static</span> <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">$_root</a> = null;
<a name="l00065"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">00065</a>         <span class="keyword">static</span> <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">$_selected</a> = array();
<a name="l00066"></a>00066 
<a name="l00067"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">00067</a>         <span class="keyword">static</span> <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">$_info</a> = array(
<a name="l00068"></a>00068                 <span class="stringliteral">&#39;count_construct&#39;</span> =&gt; 0,
<a name="l00069"></a>00069                 <span class="stringliteral">&#39;count_destruct&#39;</span> =&gt; 0,
<a name="l00070"></a>00070                 <span class="stringliteral">&#39;count_YuTori&#39;</span> =&gt; 0,
<a name="l00071"></a>00071                 <span class="stringliteral">&#39;count_max_YuTori&#39;</span> =&gt; 0,
<a name="l00072"></a>00072                 );
<a name="l00073"></a>00073 
<a name="l00074"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7943a1fdb8789bfab359ae90f133b5ad">00074</a>         <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a7943a1fdb8789bfab359ae90f133b5ad">$_object</a> = null;
<a name="l00075"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a68bb763a2c4dbe1a0b104676a602a590">00075</a>         <span class="keyword">protected</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a68bb763a2c4dbe1a0b104676a602a590">$_selector</a> = <span class="stringliteral">&#39;&#39;</span>;
<a name="l00076"></a>00076 
<a name="l00077"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a694b436a3982e142f8ebf13deb81f869">00077</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a694b436a3982e142f8ebf13deb81f869">$_methodResult</a> = null;
<a name="l00078"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5699ec808c62a1af59ae8616af2d98ab">00078</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5699ec808c62a1af59ae8616af2d98ab">$_callResult</a> = null;
<a name="l00079"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a0288656133b77ba0d064240761b1e21a">00079</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0288656133b77ba0d064240761b1e21a">$_isCalled</a> = <span class="keyword">false</span>;
<a name="l00080"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a56fd85b2d8dc7df43a6d29b298be1350">00080</a>         <span class="keyword">private</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a56fd85b2d8dc7df43a6d29b298be1350">$_isOutput</a> = <span class="keyword">true</span>;
<a name="l00081"></a>00081 
<a name="l00082"></a>00082         
<a name="l00083"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">00083</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">TYPE_NULL</a>         =       0x01;
<a name="l00084"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">00084</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">TYPE_BOOL</a>         =       0x02;
<a name="l00085"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">00085</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">TYPE_SCALAR</a>               =       0x03;
<a name="l00086"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">00086</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">TYPE_ARRAY</a>                =       0x04;
<a name="l00087"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">00087</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">TYPE_OBJECT</a>               =       0x05;
<a name="l00088"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">00088</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">TYPE_CALLABLE</a>     =       0x06;
<a name="l00089"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">00089</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">TYPE_AUTO</a>         =       0x07;
<a name="l00090"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">00090</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">TYPE_FILE</a>         =       0x08;
<a name="l00091"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">00091</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">TYPE_EMPTY</a>                =       0xff;
<a name="l00092"></a>00092 
<a name="l00093"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">00093</a>         <span class="keyword">const</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">STRING_THIS</a>               =       <span class="stringliteral">&#39;this&#39;</span>;
<a name="l00094"></a>00094         
<a name="l00099"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#acf1fe8f3a8ef1181ec36c5906101125f">00099</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#acf1fe8f3a8ef1181ec36c5906101125f">__construct</a> (<a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> $instance, $selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00100"></a>00100                 $this-&gt;_selector = $selector;
<a name="l00101"></a>00101                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">_setObject</a> ($instance);
<a name="l00102"></a>00102 
<a name="l00103"></a>00103                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_construct&#39;</span>]++;
<a name="l00104"></a>00104                 <span class="keywordflow">if</span> (++<a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>] &gt; <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_max_YuTori&#39;</span>]) <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_max_YuTori&#39;</span>] = <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>];
<a name="l00105"></a>00105         }
<a name="l00106"></a>00106 
<a name="l00107"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a421831a265621325e1fdd19aace0c758">00107</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a421831a265621325e1fdd19aace0c758">__destruct</a> () {
<a name="l00108"></a>00108                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_destruct&#39;</span>]++;
<a name="l00109"></a>00109                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>[<span class="stringliteral">&#39;count_YuTori&#39;</span>]--;
<a name="l00110"></a>00110         }
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a9f0be6ae273d3669e11c29910a0be338">00112</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a9f0be6ae273d3669e11c29910a0be338">init</a> () {
<a name="l00113"></a>00113                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a> = null;
<a name="l00114"></a>00114                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a> = array();
<a name="l00115"></a>00115 
<a name="l00116"></a>00116                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a> = array(
<a name="l00117"></a>00117                         <span class="stringliteral">&#39;count_construct&#39;</span> =&gt; 0,
<a name="l00118"></a>00118                         <span class="stringliteral">&#39;count_destruct&#39;</span> =&gt; 0,
<a name="l00119"></a>00119                         <span class="stringliteral">&#39;count_YuTori&#39;</span> =&gt; 0,
<a name="l00120"></a>00120                         <span class="stringliteral">&#39;count_max_YuTori&#39;</span> =&gt; 0,
<a name="l00121"></a>00121                 );
<a name="l00122"></a>00122                 <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a> = array(
<a name="l00123"></a>00123                         <span class="stringliteral">&#39;count_construct_object&#39;</span> =&gt; 0,
<a name="l00124"></a>00124                         <span class="stringliteral">&#39;count_destruct_object&#39;</span> =&gt; 0,
<a name="l00125"></a>00125                         <span class="stringliteral">&#39;count_object&#39;</span> =&gt; 0,
<a name="l00126"></a>00126                         <span class="stringliteral">&#39;count_max_object&#39;</span> =&gt; 0,
<a name="l00127"></a>00127                 );
<a name="l00128"></a>00128         }
<a name="l00129"></a>00129 
<a name="l00130"></a>00130         <span class="comment">/**************** Methods for Instances ****************/</span>
<a name="l00131"></a>00131 
<a name="l00136"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">00136</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">factory</a> ($instance, $name = null, array $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00137"></a>00137                 $objYuTori = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(&amp;$instance, $name, &amp;$children, $type);
<a name="l00138"></a>00138                 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($objYuTori, $objYuTori-&gt;_name);
<a name="l00139"></a>00139         }
<a name="l00140"></a>00140         
<a name="l00145"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">00145</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">newObject</a> ($instance, $name = null, array $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00146"></a>00146                 $name = str_replace (array(<span class="charliteral">&#39;.&#39;</span>, <span class="charliteral">&#39; &#39;</span>), <span class="stringliteral">&#39;&#39;</span>, $name);
<a name="l00147"></a>00147                 <span class="keywordflow">if</span> (strcasecmp(<a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">YuTori::STRING_THIS</a>, $name) === 0) <span class="keywordflow">throw</span> <span class="keyword">new</span> Exception (<span class="stringliteral">&#39;YuToriObject cannot be named &quot;this&quot;&#39;</span>);
<a name="l00148"></a>00148                 $newChildren = array();
<a name="l00149"></a>00149 
<a name="l00150"></a>00150                 <span class="keywordflow">if</span> ($instance instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00151"></a>00151                         <span class="keywordflow">if</span> ($name) $instance-&gt;_name = $name;
<a name="l00152"></a>00152                         <span class="keywordflow">if</span> (isset($instance-&gt;_object)) $objYuTori = $instance-&gt;_object;
<a name="l00153"></a>00153                         <span class="keywordflow">else</span> $objYuTori = $instance;
<a name="l00154"></a>00154                         $newChildren = &amp;$objYuTori-&gt;_children;
<a name="l00155"></a>00155                         unset ($objYuTori-&gt;_children);
<a name="l00156"></a>00156                         $objYuTori-&gt;_children = array();
<a name="l00157"></a>00157                 } <span class="keywordflow">else</span> {
<a name="l00158"></a>00158                         $objYuTori = <span class="keyword">new</span> YuToriObject ();
<a name="l00159"></a>00159                         $objYuTori-&gt;_name = $name;
<a name="l00160"></a>00160                         <span class="keywordflow">switch</span> ($type) {
<a name="l00161"></a>00161                                 <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>) :
<a name="l00162"></a>00162                                         <span class="keywordflow">if</span> (is_callable($instance)) {
<a name="l00163"></a>00163                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>;
<a name="l00164"></a>00164                                                 <span class="keywordflow">if</span> ($name == null) {
<a name="l00165"></a>00165                                                         <span class="keywordflow">if</span> (is_array($instance)) $objYuTori-&gt;_name = $instance[1];
<a name="l00166"></a>00166                                                         <span class="keywordflow">else</span> $objYuTori-&gt;_name = $instance;
<a name="l00167"></a>00167                                                 }
<a name="l00168"></a>00168                                         }
<a name="l00169"></a>00169                                         <span class="keywordflow">break</span>;
<a name="l00170"></a>00170                                 <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>) :
<a name="l00171"></a>00171                                         <span class="keywordflow">if</span> (is_file($instance)) {
<a name="l00172"></a>00172                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>;
<a name="l00173"></a>00173                                         }
<a name="l00174"></a>00174                                         <span class="keywordflow">break</span>;
<a name="l00175"></a>00175                                 <span class="keywordflow">case</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) :
<a name="l00176"></a>00176                                         <span class="keywordflow">if</span> (is_null($instance)) {
<a name="l00177"></a>00177                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5e1f66f767bfb7293469d627772da2bb">YuTori::TYPE_NULL</a>;
<a name="l00178"></a>00178                                         } elseif (is_bool ($instance)) {
<a name="l00179"></a>00179                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a2008e61ac981f88cf7a8218c600077f5">YuTori::TYPE_BOOL</a>;
<a name="l00180"></a>00180                                         } elseif (is_scalar ($instance)) {
<a name="l00181"></a>00181                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a40e11b5ee4ea95b924f0c0b6d37809dc">YuTori::TYPE_SCALAR</a>;
<a name="l00182"></a>00182                                         } elseif (is_array ($instance)) {
<a name="l00183"></a>00183                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a>;
<a name="l00184"></a>00184                                                 <span class="keywordflow">foreach</span> ($instance as $key=&gt;$val) {
<a name="l00185"></a>00185                                                         <span class="keywordflow">if</span> (is_a ($val, <span class="stringliteral">&#39;YuToriObject&#39;</span>)) {
<a name="l00186"></a>00186                                                                 $newChildren[] = $val;
<a name="l00187"></a>00187                                                         } <span class="keywordflow">else</span> {
<a name="l00188"></a>00188                                                                 $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a> (&amp;$instance[$key], $key);
<a name="l00189"></a>00189                                                                 $child-&gt;_parents[] = $objYuTori;
<a name="l00190"></a>00190                                                                 $newChildren[] = $child;
<a name="l00191"></a>00191                                                         }
<a name="l00192"></a>00192                                                 }
<a name="l00193"></a>00193                                                 unset ($instance); $instance = array();
<a name="l00194"></a>00194                                         } elseif (is_object ($instance)) {
<a name="l00195"></a>00195                                                 $objYuTori-&gt;_type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>;
<a name="l00196"></a>00196                                         }
<a name="l00197"></a>00197                                         <span class="keywordflow">break</span>;
<a name="l00198"></a>00198                                 <span class="keywordflow">default</span>:
<a name="l00199"></a>00199                                         <span class="keywordflow">break</span>;
<a name="l00200"></a>00200                         }
<a name="l00201"></a>00201                         <span class="keywordflow">if</span> ($objYuTori-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00202"></a>00202                                 $objYuTori-&gt;_name = null;
<a name="l00203"></a>00203                                 $instance = null;
<a name="l00204"></a>00204                         }
<a name="l00205"></a>00205         
<a name="l00206"></a>00206                         $objYuTori-&gt;_instance = &amp;$instance;
<a name="l00207"></a>00207                 }
<a name="l00208"></a>00208                 <span class="keywordflow">foreach</span> ($children as $key=&gt;$val) {
<a name="l00209"></a>00209                         <span class="keywordflow">if</span> (is_a ($val, <span class="stringliteral">&#39;YuToriObject&#39;</span>)) {
<a name="l00210"></a>00210                                 $newChildren[] = $val;
<a name="l00211"></a>00211                         } <span class="keywordflow">else</span> {
<a name="l00212"></a>00212                                 $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a> (&amp;$children[$key], $key);
<a name="l00213"></a>00213                                 $child-&gt;_parents[] = $objYuTori;
<a name="l00214"></a>00214                                 $newChildren[] = $child;
<a name="l00215"></a>00215                         }
<a name="l00216"></a>00216                 }
<a name="l00217"></a>00217                 $i = 0;
<a name="l00218"></a>00218                 <span class="keywordflow">foreach</span> ($newChildren as $val) {
<a name="l00219"></a>00219                         <span class="keywordflow">if</span> (is_numeric($val-&gt;_name)) $val-&gt;_name = $i++;
<a name="l00220"></a>00220                         $objYuTori-&gt;_children[] = $val;
<a name="l00221"></a>00221                 }
<a name="l00222"></a>00222                 
<a name="l00223"></a>00223                 <span class="keywordflow">return</span> $objYuTori;
<a name="l00224"></a>00224         }
<a name="l00225"></a>00225 
<a name="l00226"></a>00226         <span class="comment">/**************** Methods for Selectors ****************/</span>
<a name="l00227"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aafa0f77afb62699a7be6e65127a06fbd">00227</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aafa0f77afb62699a7be6e65127a06fbd">getSelector</a> () {
<a name="l00228"></a>00228                 <span class="keywordflow">return</span> $this-&gt;_selector;
<a name="l00229"></a>00229         }
<a name="l00230"></a>00230 
<a name="l00231"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">00231</a>         <span class="keyword">static</span> <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">selected</a> ($before = 0) {
<a name="l00232"></a>00232                 <span class="keywordflow">if</span> ($cnt = <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>(<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>)) {
<a name="l00233"></a>00233                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>[$cnt-1-$before]);
<a name="l00234"></a>00234                 } <span class="keywordflow">else</span> {
<a name="l00235"></a>00235                         <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a> ();
<a name="l00236"></a>00236                 }
<a name="l00237"></a>00237         }
<a name="l00238"></a>00238         
<a name="l00243"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">00243</a>         <span class="keyword">static</span> <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">rootSelector</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00244"></a>00244                 <span class="keywordflow">if</span> (is_null(<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>)) <a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a> = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(null, <span class="stringliteral">&#39;Root&#39;</span>);
<a name="l00245"></a>00245                 <span class="keywordflow">if</span> ($selector instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00246"></a>00246                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($selector);
<a name="l00247"></a>00247                 } <span class="keywordflow">else</span> {
<a name="l00248"></a>00248                         <span class="keywordflow">if</span> (strlen ($selector) == 0) {
<a name="l00249"></a>00249                                 <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>);
<a name="l00250"></a>00250                         } <span class="keywordflow">else</span>{
<a name="l00251"></a>00251                                 $object = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#a15ea8c78d28d8d9b6023dedbe622c731">YuTori::$_root</a>);
<a name="l00252"></a>00252                                 <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00253"></a>00253                                         $objRet = $object-&gt;_searchArray($object-&gt;_children, $selector, func_get_arg(1));
<a name="l00254"></a>00254                                         <span class="keywordflow">if</span> ($selector) <span class="keywordflow">return</span> $objRet-&gt;child ($selector, func_get_arg(1));
<a name="l00255"></a>00255                                         <span class="keywordflow">else</span> <span class="keywordflow">return</span> $objRet;
<a name="l00256"></a>00256                                 } <span class="keywordflow">else</span> {
<a name="l00257"></a>00257                                         $objRet = $object-&gt;_searchArray($object-&gt;_children, $selector);
<a name="l00258"></a>00258                                         <span class="keywordflow">if</span> ($selector) <span class="keywordflow">return</span> $objRet-&gt;child ($selector);
<a name="l00259"></a>00259                                         <span class="keywordflow">else</span> <span class="keywordflow">return</span> $objRet;
<a name="l00260"></a>00260                                 }
<a name="l00261"></a>00261                         }
<a name="l00262"></a>00262                 }
<a name="l00263"></a>00263         }
<a name="l00264"></a>00264 
<a name="l00265"></a>00265         <span class="comment">/**************** Internal Methods ****************/</span>
<a name="l00270"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">00270</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#abd01fac2d3ab887e78f0e11c7f81dad3">_setObject</a> (<a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> $object) {
<a name="l00271"></a>00271                 $this-&gt;_instance        = &amp;$object-&gt;_instance;
<a name="l00272"></a>00272                 $this-&gt;_name            = &amp;$object-&gt;_name;
<a name="l00273"></a>00273                 $this-&gt;_type            = &amp;$object-&gt;_type;
<a name="l00274"></a>00274                 $this-&gt;_children        = &amp;$object-&gt;_children;
<a name="l00275"></a>00275                 $this-&gt;_parents = &amp;$object-&gt;_parents;
<a name="l00276"></a>00276 
<a name="l00277"></a>00277                 <span class="keywordflow">if</span> (isset($object-&gt;_object)) $this-&gt;_object     = &amp;$object-&gt;_object;
<a name="l00278"></a>00278                 <span class="keywordflow">else</span> $this-&gt;_object     = &amp;$object;
<a name="l00279"></a>00279         }
<a name="l00280"></a>00280 
<a name="l00285"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">00285</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> ($methodName, $callOption=0, &amp;$arg1=null,&amp;$arg2=null,&amp;$arg3=null,&amp;$arg4=null) {
<a name="l00286"></a>00286                 <a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>[] = $this;
<a name="l00287"></a>00287                 $this-&gt;_methodResult = null;
<a name="l00288"></a>00288                 <span class="keywordflow">if</span> ($callOption &amp; 0x01) {
<a name="l00289"></a>00289                         $this-&gt;_callResult = null;
<a name="l00290"></a>00290                         $this-&gt;_isCalled = <span class="keyword">false</span>;
<a name="l00291"></a>00291                 }
<a name="l00292"></a>00292                 <span class="keywordflow">if</span> ($callOption &amp; 0x10 &amp;&amp; $this-&gt;_callResult == null) {
<a name="l00293"></a>00293                         $this-&gt;_callResult = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00294"></a>00294                 }
<a name="l00295"></a>00295                 
<a name="l00296"></a>00296                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
<a name="l00297"></a>00297         }
<a name="l00298"></a>00298 
<a name="l00303"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">00303</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> () {
<a name="l00304"></a>00304                 array_pop(<a class="code" href="../../d0/dfd/class_yu_tori.html#a9b616083f503acbdf5a2575baad78779">YuTori::$_selected</a>);
<a name="l00305"></a>00305                 <span class="keywordflow">return</span> $this-&gt;_methodResult;
<a name="l00306"></a>00306         }
<a name="l00307"></a>00307 
<a name="l00308"></a>00308         <span class="comment">/**************** Methods for YuTori ****************/</span>
<a name="l00315"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a830b5c75df72b32396701bc563fbe3c7">00315</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a830b5c75df72b32396701bc563fbe3c7">getType</a> () {<span class="keywordflow">return</span> $this-&gt;_type;}
<a name="l00316"></a>00316 
<a name="l00324"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2fe666694997d047711d7653eca2f132">00324</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2fe666694997d047711d7653eca2f132">setName</a> ($name) {
<a name="l00325"></a>00325                 <span class="keywordflow">if</span> (is_scalar ($name)) $this-&gt;_name = $name;
<a name="l00326"></a>00326                 <span class="keywordflow">return</span> $this-&gt;_name;
<a name="l00327"></a>00327         }
<a name="l00328"></a>00328 
<a name="l00335"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a3d0963e68bb313b163a73f2803c64600">00335</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a3d0963e68bb313b163a73f2803c64600">getName</a> () {
<a name="l00336"></a>00336                 <span class="keywordflow">return</span> $this-&gt;_name;
<a name="l00337"></a>00337         }
<a name="l00338"></a>00338 
<a name="l00345"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2b284f11184201a8ba8a92de57f93580">00345</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2b284f11184201a8ba8a92de57f93580">getFullName</a> () {
<a name="l00346"></a>00346                 $fullName = $this-&gt;_name;
<a name="l00347"></a>00347                 $obj = $this;
<a name="l00348"></a>00348                 <span class="keywordflow">while</span> (isset ($obj-&gt;_parents[0])) {
<a name="l00349"></a>00349                         $obj = $obj-&gt;_parents[0];
<a name="l00350"></a>00350                         $fullName = $obj-&gt;_name. <span class="charliteral">&#39;.&#39;</span>. $fullName;
<a name="l00351"></a>00351                 }
<a name="l00352"></a>00352                 <span class="keywordflow">return</span> $fullName;
<a name="l00353"></a>00353         }
<a name="l00354"></a>00354 
<a name="l00355"></a>00355         <span class="comment">/**************** Methods for Manipulate ****************/</span>
<a name="l00356"></a>00356 
<a name="l00364"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac33ee765f5ad9f134540bac393721cfe">00364</a>         <span class="keyword">public</span> function <span class="keyword">get</span> () {
<a name="l00365"></a>00365                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__)) {
<a name="l00366"></a>00366                         <span class="keywordflow">switch</span> ($this-&gt;_type) {
<a name="l00367"></a>00367                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a> :
<a name="l00368"></a>00368                                         $this-&gt;_methodResult = array();
<a name="l00369"></a>00369                                         $index = -1;
<a name="l00370"></a>00370                                         <span class="keywordflow">while</span> (isset($this-&gt;_children[++$index])) {
<a name="l00371"></a>00371                                                 $obj = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($this-&gt;_children[$index], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$this-&gt;_children[$index]-&gt;_name);
<a name="l00372"></a>00372                                                 $this-&gt;_methodResult[$obj-&gt;_name] = $obj-&gt;get();
<a name="l00373"></a>00373                                         }
<a name="l00374"></a>00374 <span class="comment">/*                                      foreach ($this-&gt;_children as $child) {</span>
<a name="l00375"></a>00375 <span class="comment">                                                $obj = YuTori::factory ($child);</span>
<a name="l00376"></a>00376 <span class="comment">                                                $this-&gt;_methodResult[$child-&gt;_name] = $obj-&gt;get ();</span>
<a name="l00377"></a>00377 <span class="comment">                                        }*/</span>
<a name="l00378"></a>00378                                         <span class="keywordflow">break</span>;
<a name="l00379"></a>00379                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a> :
<a name="l00380"></a>00380                                         $this-&gt;_methodResult = file_get_contents($this-&gt;_instance);
<a name="l00381"></a>00381                                         <span class="keywordflow">break</span>;
<a name="l00382"></a>00382                                 <span class="keywordflow">default</span>: 
<a name="l00383"></a>00383                                         $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00384"></a>00384                                         <span class="keywordflow">break</span>;
<a name="l00385"></a>00385                         }
<a name="l00386"></a>00386                 }
<a name="l00387"></a>00387                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00388"></a>00388         }
<a name="l00389"></a>00389 
<a name="l00394"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a98a9497f8c0d2aebb0d3873540d296d2">00394</a>         <span class="keyword">public</span> function <span class="keyword">set</span> ($instance, $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00395"></a>00395                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0x01)) {
<a name="l00396"></a>00396                         $this-&gt;_methodResult = $this;
<a name="l00397"></a>00397                         $objYuTori = <a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(&amp;$instance, $this-&gt;_name, array(), $type);
<a name="l00398"></a>00398                         <span class="keywordflow">if</span> ($objYuTori-&gt;_type !== <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00399"></a>00399                                 $this-&gt;_object-&gt;_children = array_merge($this-&gt;_children, $objYuTori-&gt;_children);
<a name="l00400"></a>00400                                 $this-&gt;_object-&gt;_instance = $objYuTori-&gt;_instance;
<a name="l00401"></a>00401                                 $this-&gt;_object-&gt;_type = $objYuTori-&gt;_type;
<a name="l00402"></a>00402                         }
<a name="l00403"></a>00403                 } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00404"></a>00404         }
<a name="l00405"></a>00405 
<a name="l00411"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#afc89964e20722727eaaedcb2b7c0d0f6">00411</a>          <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#afc89964e20722727eaaedcb2b7c0d0f6">pick</a> () { <span class="keywordflow">return</span> $this-&gt;_object; }
<a name="l00412"></a>00412 
<a name="l00427"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">00427</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a> () {
<a name="l00428"></a>00428                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0)) {
<a name="l00429"></a>00429                         <span class="keywordflow">switch</span> ($this-&gt;_type) {
<a name="l00430"></a>00430                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a11563c517f16ce832ff4fed40928a12b">YuTori::TYPE_ARRAY</a> :
<a name="l00431"></a>00431                                         $this-&gt;_methodResult = array();
<a name="l00432"></a>00432                                         $index = -1;
<a name="l00433"></a>00433                                         <span class="keywordflow">while</span> (isset($this-&gt;_children[++$index])) {
<a name="l00434"></a>00434                                                 $obj = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($this-&gt;_children[$index], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$this-&gt;_children[$index]-&gt;_name);
<a name="l00435"></a>00435                                                 $this-&gt;_methodResult[$obj-&gt;_name] = call_user_func_array(array($obj, <span class="stringliteral">&quot;call&quot;</span>), func_get_args());
<a name="l00436"></a>00436                                         }
<a name="l00437"></a>00437                                         <span class="keywordflow">break</span>;
<a name="l00438"></a>00438                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a> :
<a name="l00439"></a>00439                                         <span class="keywordflow">if</span> (method_exists ($this-&gt;_instance, <span class="stringliteral">&quot;call&quot;</span>)) {
<a name="l00440"></a>00440                                                 $this-&gt;_methodResult = call_user_func_array(array($this-&gt;_instance, <span class="stringliteral">&quot;call&quot;</span>), func_get_args ());
<a name="l00441"></a>00441                                         } <span class="keywordflow">else</span> {
<a name="l00442"></a>00442                                                 $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00443"></a>00443                                         }
<a name="l00444"></a>00444                                         <span class="keywordflow">break</span>;
<a name="l00445"></a>00445                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a> :
<a name="l00446"></a>00446                                         $this-&gt;_methodResult = call_user_func_array($this-&gt;_instance, func_get_args ());
<a name="l00447"></a>00447                                         <span class="keywordflow">break</span>;
<a name="l00448"></a>00448                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a> :
<a name="l00449"></a>00449                                         include ($this-&gt;_instance);
<a name="l00450"></a>00450                                         <span class="keywordflow">break</span>;
<a name="l00451"></a>00451                                 <span class="keywordflow">case</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a> :
<a name="l00452"></a>00452                                         $this-&gt;_methodResult = null;
<a name="l00453"></a>00453                                         <span class="keywordflow">break</span>;
<a name="l00454"></a>00454                                 <span class="keywordflow">default</span>: 
<a name="l00455"></a>00455                                         $this-&gt;_methodResult = $this-&gt;_instance;
<a name="l00456"></a>00456                                         <span class="keywordflow">break</span>;
<a name="l00457"></a>00457                         }
<a name="l00458"></a>00458                 }
<a name="l00459"></a>00459                 $this-&gt;_callResult = $this-&gt;_methodResult;
<a name="l00460"></a>00460                 $this-&gt;_isCalled = <span class="keyword">true</span>;
<a name="l00461"></a>00461                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> ();
<a name="l00462"></a>00462         }
<a name="l00463"></a>00463 
<a name="l00464"></a>00464         <span class="comment">/**************** Methods for Families ****************/</span>
<a name="l00465"></a>00465 
<a name="l00470"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">00470</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($instance, $name = null, $children = array(), $type = <a class="code" href="../../d0/dfd/class_yu_tori.html#a5a7c96c17d77db8d99bd2078c3126733">YuTori::TYPE_AUTO</a>) {
<a name="l00471"></a>00471                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $instance, $name, $children, $type)) {
<a name="l00472"></a>00472                         $child = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a> (&amp;$instance, $name, $children, $type);
<a name="l00473"></a>00473                         <span class="keywordflow">if</span> ($child-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>) {
<a name="l00474"></a>00474                                 $child-&gt;_parents[] = $this-&gt;_object;
<a name="l00475"></a>00475                                 <span class="keywordflow">if</span> ($child-&gt;_name) {
<a name="l00476"></a>00476                                         <span class="keywordflow">foreach</span> ($this-&gt;_children as $key=&gt;$obj) {
<a name="l00477"></a>00477                                                 <span class="keywordflow">if</span> (strcasecmp($child-&gt;_name, $obj-&gt;_name) === 0) {
<a name="l00478"></a>00478                                                         unset ($this-&gt;_children[$key]);
<a name="l00479"></a>00479                                                         $this-&gt;_children = array_values ($this-&gt;_children);
<a name="l00480"></a>00480                                                         <span class="keywordflow">foreach</span> ($obj-&gt;_parents as $parentKey=&gt;$parentObj) {
<a name="l00481"></a>00481                                                                 <span class="keywordflow">if</span> (strcasecmp($this-&gt;_name, $parentObj-&gt;_name) === 0) {
<a name="l00482"></a>00482                                                                         unset ($parentObj-&gt;_parents[$parentKey]);
<a name="l00483"></a>00483                                                                         $parentObj-&gt;_parents = array_values ($parentObj-&gt;_parents);
<a name="l00484"></a>00484                                                                 }
<a name="l00485"></a>00485                                                         }
<a name="l00486"></a>00486                                                 }
<a name="l00487"></a>00487                                         }
<a name="l00488"></a>00488                                 } <span class="keywordflow">else</span> {
<a name="l00489"></a>00489                                         $child-&gt;_name = <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> ($this-&gt;_children);
<a name="l00490"></a>00490                                 }
<a name="l00491"></a>00491                                 $this-&gt;_children[] = $child;
<a name="l00492"></a>00492                         }
<a name="l00493"></a>00493                         $this-&gt;_methodResult = <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($child, $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$child-&gt;_name);
<a name="l00494"></a>00494                 }
<a name="l00495"></a>00495                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a> (__FUNCTION__);
<a name="l00496"></a>00496         }
<a name="l00497"></a>00497 
<a name="l00508"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">00508</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">child</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00509"></a>00509                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $selector)) {
<a name="l00510"></a>00510                         <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00511"></a>00511                                 $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_children, $selector, func_get_arg(1));
<a name="l00512"></a>00512                                 <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;child ($selector, func_get_arg(1));
<a name="l00513"></a>00513                                 <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00514"></a>00514                         } <span class="keywordflow">else</span> {
<a name="l00515"></a>00515                                 $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_children, $selector);
<a name="l00516"></a>00516                                 <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;child ($selector);
<a name="l00517"></a>00517                                 <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00518"></a>00518                         }
<a name="l00519"></a>00519                 }
<a name="l00520"></a>00520                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00521"></a>00521         }
<a name="l00522"></a>00522 
<a name="l00529"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">00529</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">parent</a> ($selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00530"></a>00530                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a> (__FUNCTION__, 0, $selector)) {
<a name="l00531"></a>00531                         <span class="keywordflow">if</span> (func_num_args() &gt; 1) {
<a name="l00532"></a>00532                                 $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_parents, $selector, func_get_arg(1));
<a name="l00533"></a>00533                                 <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;parent ($selector, func_get_arg(1));
<a name="l00534"></a>00534                                 <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00535"></a>00535                         } <span class="keywordflow">else</span> {
<a name="l00536"></a>00536                                 $objRet = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a>($this-&gt;_parents, $selector);
<a name="l00537"></a>00537                                 <span class="keywordflow">if</span> ($selector) $this-&gt;_methodResult = $objRet-&gt;parent ($selector);
<a name="l00538"></a>00538                                 <span class="keywordflow">else</span> $this-&gt;_methodResult = $objRet;
<a name="l00539"></a>00539                         }
<a name="l00540"></a>00540                 }
<a name="l00541"></a>00541                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00542"></a>00542         }
<a name="l00543"></a>00543 
<a name="l00552"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac4a0c353b6afadd90e066a769d02de93">00552</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ac4a0c353b6afadd90e066a769d02de93">neighbor</a> ($childSelector = <span class="stringliteral">&#39;&#39;</span>, $parentSelector = 0) {
<a name="l00553"></a>00553                 <span class="keywordflow">if</span> (($objParent = $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af2256747dd7f5f0a5995ec33a70c92e8">parent</a>($parentSelector, <span class="keyword">false</span>)) &amp;&amp; ($objChild = $objParent-&gt;child($childSelector))) {
<a name="l00554"></a>00554                         <span class="keywordflow">return</span> $objChild;
<a name="l00555"></a>00555                 }
<a name="l00556"></a>00556                 <span class="keywordflow">if</span> (func_num_args() &gt; 2) <span class="keywordflow">return</span> func_get_arg(2);
<a name="l00557"></a>00557                 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(<span class="stringliteral">&#39;&#39;</span>, null, <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>), $childSelector);
<a name="l00558"></a>00558         }
<a name="l00559"></a>00559 
<a name="l00565"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">00565</a>         <span class="keyword">private</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a95deb5f34a7b46c17c85d4d4852105e9">_searchArray</a> (&amp;$array, &amp;$orgSelector) {
<a name="l00566"></a>00566                 $selector = $orgSelector;
<a name="l00567"></a>00567                 $orgSelector = null;
<a name="l00568"></a>00568                 <span class="keywordflow">if</span> ($selector === <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00569"></a>00569                         <span class="comment">// セレクタが空の時はオブジェクトを全て返す。</span>
<a name="l00570"></a>00570                         $arrObject = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($array);
<a name="l00571"></a>00571                         <span class="keywordflow">return</span> $arrObject;
<a name="l00572"></a>00572                 } elseif (is_object ($selector)) {
<a name="l00573"></a>00573                         <span class="keywordflow">foreach</span> ($array as $key=&gt;$obj) {
<a name="l00574"></a>00574                                 <span class="keywordflow">if</span> (($selector instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a> &amp;&amp; $obj-&gt;_instance === $selector-&gt;_instance) || ($selector === $obj-&gt;_instance)) {
<a name="l00575"></a>00575                                         <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($obj, $selector);
<a name="l00576"></a>00576                                 }
<a name="l00577"></a>00577                         }
<a name="l00578"></a>00578                 } elseif (is_scalar($selector)) {
<a name="l00579"></a>00579                         <span class="comment">// 現在のセレクタを判定</span>
<a name="l00580"></a>00580                         $selector = str_replace (<span class="charliteral">&#39; &#39;</span>, <span class="stringliteral">&#39;&#39;</span>, $selector);
<a name="l00581"></a>00581                         $exSelector = explode (<span class="charliteral">&#39;.&#39;</span>, $selector, 2);
<a name="l00582"></a>00582                         <span class="keywordflow">if</span> (isset($exSelector[1])) $orgSelector = trim($exSelector[1], <span class="charliteral">&#39;.&#39;</span>);
<a name="l00583"></a>00583 
<a name="l00584"></a>00584                         <span class="comment">// セレクタが数値か文字列か</span>
<a name="l00585"></a>00585                         <span class="keywordflow">if</span> (is_numeric ($exSelector[0])) {
<a name="l00586"></a>00586                                 <span class="keywordflow">if</span> (isset ($array[$exSelector[0]])) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($array[$exSelector[0]], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$exSelector[0]);
<a name="l00587"></a>00587                         } elseif (is_string ($exSelector[0]) &amp;&amp; strcasecmp($exSelector[0], <a class="code" href="../../d0/dfd/class_yu_tori.html#a5d09b3be550871c5f38822d50fa4c8a0">YuTori::STRING_THIS</a>)===0) {
<a name="l00588"></a>00588                                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#a976ccae12b0117ff37f1a7d492ee91fc">YuTori::selected</a>();
<a name="l00589"></a>00589                         } elseif (is_string ($exSelector[0])) {
<a name="l00590"></a>00590                                 <span class="keywordflow">foreach</span> ($array as $key=&gt;$obj) {
<a name="l00591"></a>00591                                         <span class="keywordflow">if</span> (strcasecmp ($exSelector[0], $obj-&gt;_name) == 0) <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> ($array[$key], $this-&gt;_selector.<span class="charliteral">&#39;.&#39;</span>.$exSelector[0]);
<a name="l00592"></a>00592                                 }
<a name="l00593"></a>00593                         }
<a name="l00594"></a>00594                 }
<a name="l00595"></a>00595                 <span class="keywordflow">if</span> (func_num_args() &gt; 2) <span class="keywordflow">return</span> func_get_arg(2);
<a name="l00596"></a>00596                 <span class="keywordflow">else</span> <span class="keywordflow">return</span> <span class="keyword">new</span> <a class="code" href="../../d0/dfd/class_yu_tori.html">YuTori</a> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ae7f1a46fb2da484d0cc85f03ff2a3d4a">YuTori::newObject</a>(<span class="stringliteral">&#39;&#39;</span>, null, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>), $selector);
<a name="l00597"></a>00597         }
<a name="l00598"></a>00598 
<a name="l00604"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">00604</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> () {
<a name="l00605"></a>00605                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a> ($this-&gt;_children);
<a name="l00606"></a>00606         }
<a name="l00607"></a>00607         
<a name="l00615"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8a8f910d6cb5ba728e20a76726ffb325">00615</a>         <span class="keyword">public</span> function <span class="keyword">remove</span> ($Name) {
<a name="l00616"></a>00616                 <span class="comment">// 子を検索</span>
<a name="l00617"></a>00617                 <span class="keywordflow">foreach</span> ($this-&gt;_children as $key=&gt;$Child) {
<a name="l00618"></a>00618                         <span class="keywordflow">if</span> (strcasecmp($Child-&gt;_name,$Name) === 0) {
<a name="l00619"></a>00619                                 <span class="keywordflow">foreach</span> ($Child-&gt;_parents as $unsetKey=&gt;$unsetObj) {
<a name="l00620"></a>00620                                         <span class="keywordflow">if</span> ($Child === $unsetObj) {
<a name="l00621"></a>00621                                                 unset ($Child-&gt;_parents[$unsetKey]);
<a name="l00622"></a>00622                                                 $Child-&gt;_parents = array_values ($Child-&gt;_parents);
<a name="l00623"></a>00623                                         }
<a name="l00624"></a>00624                                 }
<a name="l00625"></a>00625                                 unset($this-&gt;_children[$key]);
<a name="l00626"></a>00626                                 $this-&gt;_children = array_values ($this-&gt;_children);
<a name="l00627"></a>00627                         }
<a name="l00628"></a>00628                 }
<a name="l00629"></a>00629                 <span class="keywordflow">return</span> $this;
<a name="l00630"></a>00630         } 
<a name="l00631"></a>00631 
<a name="l00632"></a>00632         <span class="comment">/**************** 比較系メソッド ****************/</span>
<a name="l00633"></a>00633         <span class="comment">/* call結果の比較はsetDefaultやsetFormat等の後に使用するとその内容で判定するので注意。*/</span>
<a name="l00634"></a>00634 
<a name="l00646"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7bdc13455517d3bde5dd08b811d9f150">00646</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7bdc13455517d3bde5dd08b811d9f150">eq</a> ($Value) {
<a name="l00647"></a>00647                 <span class="keywordflow">if</span> (is_object($Value)) {
<a name="l00648"></a>00648                         <span class="keywordflow">if</span> ($Value instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00649"></a>00649                                 $Value = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, $Value)-&gt;call();
<a name="l00650"></a>00650                         }
<a name="l00651"></a>00651                 }
<a name="l00652"></a>00652                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00653"></a>00653                 <span class="keywordflow">return</span> $this-&gt;_output == $Value;
<a name="l00654"></a>00654         }
<a name="l00655"></a>00655 
<a name="l00667"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a450853ae13800f9b19cbf2b0a9e74cb1">00667</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a450853ae13800f9b19cbf2b0a9e74cb1">seq</a> ($Value) {
<a name="l00668"></a>00668                 <span class="keywordflow">if</span> (is_object($Value)) {
<a name="l00669"></a>00669                         <span class="keywordflow">if</span> ($Value instanceof <a class="code" href="../../db/d44/class_yu_tori_object.html" title="YuToriオブジェクト保持クラス">YuToriObject</a>) {
<a name="l00670"></a>00670                                 $Value = <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, $Value)-&gt;call();
<a name="l00671"></a>00671                         }
<a name="l00672"></a>00672                 }
<a name="l00673"></a>00673                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00674"></a>00674                 <span class="keywordflow">return</span> $this-&gt;_output === $Value;
<a name="l00675"></a>00675         }
<a name="l00676"></a>00676 
<a name="l00677"></a>00677 
<a name="l00684"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aedcc52b3673b8df9425e52f13accb2a1">00684</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aedcc52b3673b8df9425e52f13accb2a1">isEmpty</a> () {
<a name="l00685"></a>00685                 <span class="keywordflow">return</span> $this-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l00686"></a>00686         }
<a name="l00687"></a>00687         
<a name="l00694"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a4af7cea238ab52f6e40a1eed86bdc1be">00694</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a4af7cea238ab52f6e40a1eed86bdc1be">isNull</a> () {
<a name="l00695"></a>00695                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00696"></a>00696                 <span class="keywordflow">return</span> !$this-&gt;_output;
<a name="l00697"></a>00697         }
<a name="l00698"></a>00698 
<a name="l00704"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a68f8091e08fce21dfe59650eef102ce2">00704</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a68f8091e08fce21dfe59650eef102ce2">isString</a> () {
<a name="l00705"></a>00705                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00706"></a>00706                 <span class="keywordflow">return</span> is_string($this-&gt;_output);
<a name="l00707"></a>00707         }
<a name="l00708"></a>00708 
<a name="l00714"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7eaae74c3493d3a74aa3a5dbc71cdf41">00714</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7eaae74c3493d3a74aa3a5dbc71cdf41">isNumeric</a> () {
<a name="l00715"></a>00715                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00716"></a>00716                 <span class="keywordflow">return</span> is_numeric($this-&gt;_output);
<a name="l00717"></a>00717         }
<a name="l00718"></a>00718 
<a name="l00724"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a2f0ab131ec6fa3f6f91721eb72ca10f0">00724</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a2f0ab131ec6fa3f6f91721eb72ca10f0">isArray</a> () {
<a name="l00725"></a>00725                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00726"></a>00726                 <span class="keywordflow">return</span> is_array($this-&gt;_output);
<a name="l00727"></a>00727         }
<a name="l00728"></a>00728 
<a name="l00734"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a51c6886df81a7ea9808d39eac07317f8">00734</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a51c6886df81a7ea9808d39eac07317f8">isObject</a> () {
<a name="l00735"></a>00735                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00736"></a>00736                 <span class="keywordflow">return</span> is_object($this-&gt;_output);
<a name="l00737"></a>00737         }
<a name="l00738"></a>00738 
<a name="l00739"></a>00739         <span class="comment">/**************** 出力系メソッド ****************/</span>
<a name="l00740"></a>00740 
<a name="l00747"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a4a20559544fdf4dcb457e258dc976cf8">00747</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a4a20559544fdf4dcb457e258dc976cf8">reset</a> () {
<a name="l00748"></a>00748                 $this-&gt;_outputFlg = <span class="keyword">false</span>;
<a name="l00749"></a>00749                 $this-&gt;_outputEmpty = <span class="keyword">false</span>;
<a name="l00750"></a>00750                 <span class="keywordflow">return</span> $this;
<a name="l00751"></a>00751         }
<a name="l00752"></a>00752 
<a name="l00761"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a25095fd1a04524b05c6e05e2f41cf230">00761</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a25095fd1a04524b05c6e05e2f41cf230">format</a> ($format = <span class="stringliteral">&#39;%s&#39;</span>) {
<a name="l00762"></a>00762                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l00763"></a>00763                         $this-&gt;_methodResult = $this;
<a name="l00764"></a>00764                         <span class="keywordflow">if</span> ($this-&gt;_isOutput) {
<a name="l00765"></a>00765                                 $this-&gt;_callResult = sprintf ($format, $this-&gt;_callResult);
<a name="l00766"></a>00766                         }
<a name="l00767"></a>00767                 } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00768"></a>00768         }
<a name="l00769"></a>00769 
<a name="l00778"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7abcb05ad01a2c3551420ed4aff42882">00778</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7abcb05ad01a2c3551420ed4aff42882">noResult</a> ($default = null) {
<a name="l00779"></a>00779                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l00780"></a>00780                         <span class="keywordflow">if</span> ($this-&gt;_isOutput &amp;&amp; !$this-&gt;_callResult) {
<a name="l00781"></a>00781                                 $this-&gt;_callResult = $default;
<a name="l00782"></a>00782                         }
<a name="l00783"></a>00783                 } <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00784"></a>00784         }
<a name="l00785"></a>00785 
<a name="l00794"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a7f9cefb1412943272f03d5c2f3483a2b">00794</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a7f9cefb1412943272f03d5c2f3483a2b">escape</a> ($type) {
<a name="l00795"></a>00795                 <span class="keywordflow">if</span> ($this-&gt;_outputEmpty) <span class="keywordflow">return</span> $this;
<a name="l00796"></a>00796                 <span class="keywordflow">if</span> (!$this-&gt;_outputFlg) $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#af15bc7e2f143b1c567b0cab96d8c57b2">call</a>();
<a name="l00797"></a>00797                 <span class="keywordflow">switch</span> (strtolower ($type)) {
<a name="l00798"></a>00798                         <span class="keywordflow">case</span> (<span class="stringliteral">&#39;html&#39;</span>):
<a name="l00799"></a>00799                                 $this-&gt;_output = htmlspecialchars ($this-&gt;_output);
<a name="l00800"></a>00800                                 <span class="keywordflow">break</span>;
<a name="l00801"></a>00801                         <span class="keywordflow">default</span>:
<a name="l00802"></a>00802                                 <span class="keywordflow">break</span>;
<a name="l00803"></a>00803                 }
<a name="l00804"></a>00804                 <span class="keywordflow">return</span> $this;
<a name="l00805"></a>00805         }
<a name="l00806"></a>00806 
<a name="l00811"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#aa7af881dda459f17d4cf8952252639b5">00811</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#aa7af881dda459f17d4cf8952252639b5">put</a> () {
<a name="l00812"></a>00812                 print $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">sput</a>();
<a name="l00813"></a>00813                 <span class="keywordflow">return</span> $this;
<a name="l00814"></a>00814         }
<a name="l00815"></a>00815         
<a name="l00820"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">00820</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a8fe3c1772eb471a4e511858219ebc1d5">sput</a> () {
<a name="l00821"></a>00821                 <span class="keywordflow">if</span> ($this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a50e46fcadc256b5410fa3e834f55778c">_openMethod</a>(__FUNCTION__, 0x10, func_get_args())) {
<a name="l00822"></a>00822                         $formats = func_get_args ();
<a name="l00823"></a>00823                         <span class="keywordflow">foreach</span> ($formats as $strFormat) {
<a name="l00824"></a>00824                                 $format = explode (<span class="charliteral">&#39;=&#39;</span>, $strFormat, 2);
<a name="l00825"></a>00825                                 <span class="keywordflow">if</span> (method_exists($this, $format[0])) {
<a name="l00826"></a>00826                                         <span class="keywordflow">if</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>($format) == 2) $this-&gt;$format[0]($format[1]);
<a name="l00827"></a>00827                                         <span class="keywordflow">else</span> $this-&gt;$format[0]();
<a name="l00828"></a>00828                                 } elseif(is_callable($format[0])) {
<a name="l00829"></a>00829                                         <span class="keywordflow">if</span> (<a class="code" href="../../d0/dfd/class_yu_tori.html#ac751e87b3d4c4bf2feb03bee8b092755">count</a>($format) == 2) $this-&gt;_callResult = $format[0]($this-&gt;_callResult, $this-&gt;$format[1]);
<a name="l00830"></a>00830                                         <span class="keywordflow">else</span> $this-&gt;_callResult = $format[0]($this-&gt;_callResult);
<a name="l00831"></a>00831                                 }
<a name="l00832"></a>00832                         }
<a name="l00833"></a>00833                         $this-&gt;_methodResult = $this-&gt;_callResult;
<a name="l00834"></a>00834                 }
<a name="l00835"></a>00835                 <span class="keywordflow">return</span> $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a087c7b406ec01e9ff73bcc1b908f170c">_closeMethod</a>();
<a name="l00836"></a>00836         }
<a name="l00846"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a5bf63e4ac70cfd9d97e3f2eab936ec8b">00846</a>         <span class="keyword">public</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a5bf63e4ac70cfd9d97e3f2eab936ec8b">dump</a> () {
<a name="l00847"></a>00847                 print (<span class="charliteral">&#39;&quot;&#39;</span>.$this-&gt;_selector. <span class="charliteral">&#39;&quot;&#39;</span>);
<a name="l00848"></a>00848                 print (<span class="stringliteral">&#39; [name:&quot;&#39;</span>.$this-&gt;_name.<span class="stringliteral">&#39;&quot;]&#39;</span>);
<a name="l00849"></a>00849                 print (<span class="stringliteral">&#39; [type:&quot;&#39;</span>.$this-&gt;_type.<span class="stringliteral">&#39;&quot;]&#39;</span>);
<a name="l00850"></a>00850                 print (<span class="charliteral">&#39;{&#39;</span>.<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l00851"></a>00851                 var_dump ($this-&gt;_instance);
<a name="l00852"></a>00852                 print (<span class="charliteral">&#39;}&#39;</span>.<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l00853"></a>00853                 <span class="keywordflow">foreach</span> ($this-&gt;_children as $Key=&gt;$Val) {
<a name="l00854"></a>00854                         $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a66a9777ce025e9ce801bdf352268f5c2">child</a> ($Val-&gt;_name)-&gt;dump ();
<a name="l00855"></a>00855                 }
<a name="l00856"></a>00856                 print(<span class="stringliteral">&quot;\n&quot;</span>);
<a name="l00857"></a>00857                 <span class="keywordflow">return</span> $this-&gt;_type == <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>;
<a name="l00858"></a>00858         }
<a name="l00859"></a>00859 
<a name="l00860"></a>00860         <span class="comment">/**************** Object型用メソッド ****************/</span>
<a name="l00861"></a>00861 
<a name="l00873"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a305d469a9ba808d755b5015f0d0a31bd">00873</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a305d469a9ba808d755b5015f0d0a31bd">prop</a> () {
<a name="l00874"></a>00874                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l00875"></a>00875                 $cntArgs = func_num_args();
<a name="l00876"></a>00876                 <span class="keywordflow">if</span> ($cntArgs == 0) {
<a name="l00877"></a>00877                         <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>(<span class="stringliteral">&#39;&#39;</span>, get_object_vars($this-&gt;_instance));
<a name="l00878"></a>00878                 } elseif ($cntArgs == 1) {
<a name="l00879"></a>00879                         $property = func_get_arg(0);
<a name="l00880"></a>00880                         <span class="keywordflow">if</span> (property_exists($this-&gt;_instance, $property)) {
<a name="l00881"></a>00881                                 <span class="keywordflow">return</span> $this-&gt;_instance-&gt;$property;
<a name="l00882"></a>00882                         } <span class="keywordflow">else</span> {
<a name="l00883"></a>00883                                 <span class="keywordflow">return</span> null;
<a name="l00884"></a>00884                         }
<a name="l00885"></a>00885                 } elseif ($cntArgs &gt; 1) {
<a name="l00886"></a>00886                         $property = func_get_arg(0);
<a name="l00887"></a>00887                         $value = func_get_arg(1);
<a name="l00888"></a>00888                         $this-&gt;_instance-&gt;$property = $value;
<a name="l00889"></a>00889                         <span class="keywordflow">return</span> $this;
<a name="l00890"></a>00890                 }
<a name="l00891"></a>00891         }
<a name="l00892"></a>00892 
<a name="l00900"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a003e687a4e5bec44a663107336b83dc6">00900</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a003e687a4e5bec44a663107336b83dc6">method</a> ($method) {
<a name="l00901"></a>00901                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l00902"></a>00902                 <span class="keywordflow">if</span> (method_exists($this-&gt;_instance, $method)) {
<a name="l00903"></a>00903                         <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($method, array($this-&gt;_instance, $method), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);;
<a name="l00904"></a>00904                 } <span class="keywordflow">else</span> {
<a name="l00905"></a>00905                         <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($method, null, <a class="code" href="../../d0/dfd/class_yu_tori.html#a3f11f6ed0d9e135ce0fd44b214bc20d5">YuTori::TYPE_EMPTY</a>);;
<a name="l00906"></a>00906                 }
<a name="l00907"></a>00907         }
<a name="l00908"></a>00908 
<a name="l00915"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a956ae93228a55a05166f239d0efc759b">00915</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a956ae93228a55a05166f239d0efc759b">addAllProp</a> () {
<a name="l00916"></a>00916                 <span class="keywordflow">if</span> ($this-&gt;_type != <a class="code" href="../../d0/dfd/class_yu_tori.html#a2365fd1fb1e6d6e994238955ce32a8ec">YuTori::TYPE_OBJECT</a>) <span class="keywordflow">return</span> $this;
<a name="l00917"></a>00917                 <span class="keywordflow">foreach</span> (get_object_vars($this-&gt;_instance) as $key=&gt;$var) {
<a name="l00918"></a>00918                         $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($key, &amp;$this-&gt;_instance-&gt;$key);
<a name="l00919"></a>00919                 }
<a name="l00920"></a>00920                 <span class="keywordflow">return</span> $this;
<a name="l00921"></a>00921         }
<a name="l00922"></a>00922         
<a name="l00929"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">00929</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">addAllMethod</a> () {
<a name="l00930"></a>00930                 <span class="comment">// 登録しないメソッド</span>
<a name="l00931"></a>00931                 $nonAdd = array(<span class="stringliteral">&#39;call&#39;</span>, <span class="stringliteral">&#39;beforeGet&#39;</span>, <span class="stringliteral">&#39;afterGet&#39;</span>, <span class="stringliteral">&#39;beforeSet&#39;</span>, <span class="stringliteral">&#39;afterSet&#39;</span>);
<a name="l00932"></a>00932                 <span class="keywordflow">foreach</span> (get_class_methods ($this-&gt;_instance) as $var) {
<a name="l00933"></a>00933                         <span class="keywordflow">if</span> (array_search ($var, $nonAdd) === <span class="keyword">false</span>) {
<a name="l00934"></a>00934                                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a43331c60cdffea7648b06cef12580c15">add</a> ($var, array($this-&gt;_instance, $var), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);
<a name="l00935"></a>00935                         }
<a name="l00936"></a>00936                 }
<a name="l00937"></a>00937                 <span class="keywordflow">return</span> $this;
<a name="l00938"></a>00938         }
<a name="l00939"></a>00939         
<a name="l00946"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a880a7a1c9bb389ed8b0223d399bff433">00946</a>         function <a class="code" href="../../d0/dfd/class_yu_tori.html#a880a7a1c9bb389ed8b0223d399bff433">addAllMember</a> () {
<a name="l00947"></a>00947                 $this-&gt;addAllAttr();
<a name="l00948"></a>00948                 $this-&gt;<a class="code" href="../../d0/dfd/class_yu_tori.html#a8d0cf839892399299170ec39a0bd6ce2">addAllMethod</a>();
<a name="l00949"></a>00949                 <span class="keywordflow">return</span> $this;
<a name="l00950"></a>00950         }
<a name="l00951"></a>00951 
<a name="l00956"></a><a class="code" href="../../d0/dfd/class_yu_tori.html#a992ac1c5c8693fee5495256f2c601bfc">00956</a>         <span class="keyword">public</span> <span class="keyword">static</span> function <a class="code" href="../../d0/dfd/class_yu_tori.html#a992ac1c5c8693fee5495256f2c601bfc">info</a> () {
<a name="l00957"></a>00957                 $ret = array_merge (<a class="code" href="../../d0/dfd/class_yu_tori.html#a1fffe4f1037a8cf0f307d069274f11c3">YuTori::$_info</a>, <a class="code" href="../../db/d44/class_yu_tori_object.html#a1fffe4f1037a8cf0f307d069274f11c3">YuToriObject::$_info</a>);
<a name="l00958"></a>00958                 <span class="keywordflow">return</span> $ret;
<a name="l00959"></a>00959         }
<a name="l00960"></a>00960 }
<a name="l00961"></a>00961 
<a name="l00966"></a>00966 function <a class="code" href="../../d7/d1c/class_y.html">Y</a> ($Selector = <span class="stringliteral">&#39;&#39;</span>) {
<a name="l00967"></a>00967         <span class="keywordflow">if</span> (func_num_args() &gt; 1) <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a>($Selector, func_get_arg(1));
<a name="l00968"></a>00968         <span class="keywordflow">else</span> <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#adb33b261c81d3513676761b9f60d8437">YuTori::rootSelector</a>($Selector);
<a name="l00969"></a>00969 }
<a name="l00970"></a>00970 
<a name="l00979"></a><a class="code" href="../../d7/d1c/class_y.html">00979</a> <span class="keyword">class </span><a class="code" href="../../d7/d1c/class_y.html">Y</a> {
<a name="l00986"></a><a class="code" href="../../d7/d1c/class_y.html#a9f0d2d52337c06f83a90bea94933191f">00986</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#a9f0d2d52337c06f83a90bea94933191f">func</a> () {
<a name="l00987"></a>00987                 $args = func_get_args (); <span class="keywordflow">if</span> (count($args) == 1) $args = $args[0];
<a name="l00988"></a>00988                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($args, <span class="stringliteral">&#39;&#39;</span>, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a0a2c1f3ba4b81c0938122ff4e88764f8">YuTori::TYPE_CALLABLE</a>);
<a name="l00989"></a>00989         }
<a name="l00990"></a>00990 
<a name="l00997"></a><a class="code" href="../../d7/d1c/class_y.html#a1847844ab8ed0f96bdfe0534c8ea8f67">00997</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#a1847844ab8ed0f96bdfe0534c8ea8f67">file</a> ($file) {
<a name="l00998"></a>00998                 <span class="keywordflow">return</span> <a class="code" href="../../d0/dfd/class_yu_tori.html#abc5f41aad67f5f93d46b4bebbfd2ec3a">YuTori::factory</a>($file, <span class="stringliteral">&#39;&#39;</span>, array(), <a class="code" href="../../d0/dfd/class_yu_tori.html#a6e21fe27fed935d13d258f1b38282e08">YuTori::TYPE_FILE</a>);
<a name="l00999"></a>00999         }
<a name="l01000"></a>01000 
<a name="l01007"></a><a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">01007</a>         <span class="keyword">static</span> function <a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">put</a> ($selector) {
<a name="l01008"></a>01008                 <span class="keywordflow">return</span> <a class="code" href="../../d7/d1c/class_y.html">Y</a>($selector)-&gt;<a class="code" href="../../d7/d1c/class_y.html#aa2fe7bf15006fd77ea6cb0a27377e4ad">put</a>();
<a name="l01009"></a>01009         }
<a name="l01010"></a>01010 }
</pre></div></div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>全て</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>データ構造</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>関数</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>変数</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<hr class="footer"/><address class="footer"><small>YuTori Classに対してWed May 9 2012 00:58:56に生成されました。&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="../../doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>
